<?php
namespace app\home\validate;

use think\Validate;

class ItemCheck extends Validate
{
    protected $rule = [
        'name' => 'require',
        'start_time' => 'require',
        'end_time' => 'require',
        'type' => 'require',
        'id' => 'require',
    ];

    protected $message = [
        'title.require' => '名称不能为空',
        'id.require' => '缺少更新条件',
        'start_time.require' => '缺少开始时间',
        'end_time.require' => '缺少结束时间',
        'type.require' => '缺少更新条件',
    ];

    protected $scene = [
        'add' => ['name','start_time','end_time','type'],
        'edit' => ['id','name','start_time','end_time','type'],
    ];
}
